<template>
  <div>
    <h2>系统参数设置</h2>
    <a-form @submit="saveSettings">
      <a-form-item label="考试时间限制">
        <a-input v-model="settings.examTimeLimit" />
      </a-form-item>
      <a-form-item label="考试间隔时间">
        <a-input v-model="settings.examInterval" />
      </a-form-item>
      <a-form-item label="答题时间提醒">
        <a-input v-model="settings.answerReminder" />
      </a-form-item>
      <a-form-item label="邮件服务器地址">
        <a-input v-model="settings.emailServer" />
      </a-form-item>
      <a-form-item label="发件人信息">
        <a-input v-model="settings.senderInfo" />
      </a-form-item>
      <a-form-item>
        <a-button type="primary" html-type="submit">保存设置</a-button>
      </a-form-item>
    </a-form>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';

const settings = ref({
  examTimeLimit: '',
  examInterval: '',
  answerReminder: '',
  emailServer: '',
  senderInfo: '',
});

const saveSettings = () => {
  console.log('保存系统设置', settings.value);
  // 这里可以添加实际的保存设置逻辑，如发送请求到后端保存配置
};
</script>

<style scoped>
/* 系统参数设置页面样式 */
</style>
